define(function (require, exports, module) {
	'use strict';
    
    var rk = require('rk');
    
    require('./asset/detail/wrDetailCtrl');
    $.widget('rk.workreportContentCtrl', $.rk.oaContentCtrl, {
        _create: function () {
            var me = this;
            var elem = me.element;

            var html = require('oa/tmpl/workreport/tpl_workreport_content_Detail.tpl');
            elem.html(rk.templateText(html));
            
        },
        _init: function () {
            var me = this;
            var elem = me.element;
            var opt = me.options;

            elem.find('#taskDetailDiv').wrDetailCtrl({
                typeAlias: opt.typeAlias,
                listId: opt.listId,
                onDeleteSucc: function () {
                    //me.loadData();
                }
            });
            elem.find('#taskDetailDiv').wrDetailCtrl('loadData', opt.reportid, opt.ownerid, function () {
            });

        }
    });
});